<include file="header" />
    <script src="__PUBLIC__/js/angular.js"></script>
    <div class="swiper-container kv" ng-app>
        <div class="swiper-wrapper">
            <div class="swiper-slide kv_6">
                <img class="ani logoImg" src="__PUBLIC__/images/logo.png"/>
                <img class="ani person" style="<{:$myPhoto == 1 ? '' : 'opacity:0;width:5%'}>" swiper-animate-effect="bounceInDown" swiper-animate-duration="1s" swiper-animate-delay="0.1s" src="__PUBLIC__/images/person.png"/>
                <div class="xinfeng ani" swiper-animate-effect="FromSmallToLarge" swiper-animate-duration="1s" swiper-animate-delay="0.5s">
                    <div class="ani" swiper-animate-effect="Infinite360Rotate2" swiper-animate-duration="1s" swiper-animate-delay="0.5s">
                        <img src="__PUBLIC__/images/xinfeng.png"/>
						<div class="paiming">照片排名:<{$rankNum}></div>
                        <div class="bg-cover" style="background-image: url(<{:C('IMG_PREFIX').$item['pic']}>);" onclick="imgBig($(this))"></div>
                        <div class="bh" ng-init="num='<{$item.id}>'">
                            <div>照片编号</div>
                            <ul>
                                <li ng-repeat="x in num track by $index" ng-bind="x"></li>
                            </ul>
                        </div>
                    </div>
                </div> 
                <ul class="twoBtn" style="margin-top:-0.8rem;position:relative;z-index:10;">
                    <li>
                        <div class="ani zan" swiper-animate-effect="bounceInUp" swiper-animate-duration="1.5s" swiper-animate-delay="1s">
                            <img src="__PUBLIC__/images/xin.png"/> <span id="numVal"><{$item.num}></span>
                        </div>
                    </li>
                    <li>
                        <if condition="$myPhoto eq 1">
                            <a href="javascript:;" class="ani" style="width:5.5rem;" swiper-animate-effect="bounceInUp" swiper-animate-duration="1.5s" swiper-animate-delay="1.5s" onclick="$('.zf').show();">帮我拉票</a>
							<a href="<{:U('lists')}>" style="margin-top:1rem;width:5.5rem;" class="ani" swiper-animate-effect="bounceInUp" swiper-animate-duration="1.5s" swiper-animate-delay="2s">查看其他<br>小伙伴的照片</a>
                        <else />
                            <a href="javascript:;" class="ani" style="width:5.5rem;" swiper-animate-effect="bounceInUp" swiper-animate-duration="1.5s" swiper-animate-delay="1.5s" onclick="praise()">帮小伙伴<br>点赞加油</a>
                            <div class="smfont ani" style="opacity:1;">&nbsp;</div>
							<a href="<{:U('upload_view')}>" style="margin-top:0.5rem;width:5.5rem;" class="ani" swiper-animate-effect="bounceInUp" swiper-animate-duration="1.5s" swiper-animate-delay="2s">我也要参加</a>
							<a href="<{:U('lists')}>" style="margin-top:1rem;width:5.5rem;" class="ani" swiper-animate-effect="bounceInUp" swiper-animate-duration="1.5s" swiper-animate-delay="2.5s">查看其他<br>小伙伴照片</a>
                        </if>
                    </li>
                </ul>
				<img src="__PUBLIC__/images/13.png" style="position:absolute;width:100%;left:0;bottom:2.5rem;z-index:1;" class="ani" swiper-animate-effect="bounceInUp" swiper-animate-duration="1.5s" swiper-animate-delay="2.8s"/>
                <!-- 广告 -->
                <include file="ad" />
            </div>
        </div>
    </div>
    <div class="popzan">
        <div class="popwin FromSmallToLarge">
            <div>
                <div>点赞成功</div>
                <ul>
                    <li>
                        <a href="javascript:;" onclick="$('.popzan').hide();">确定</a>
                    </li>
                    <li>
                        <a href="<{:U('upload_view')}>">我也要晒照</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
	
    <div class="zf" onclick="$(this).hide();"></div>
    <div class="imgBig" onclick="$(this).hide();"></div>
	<script> 
        var mySwiper = new Swiper('.swiper-container',{
            direction : 'vertical',
            width : window.innerWidth,
            height : window.innerHeight,
            onInit: function(swiper){ //Swiper2.x的初始化是onFirstInit
                swiperAnimateCache(swiper); //隐藏动画元素 
                swiperAnimate(swiper); //初始化完成开始动画
            }
        });

        function imgBig(obj){
            $('.imgBig').show().css("background-image",obj.css("background-image"));
        }

        //点赞
        function praise() {
            //判断是否关注且有cookie
            if ('<{$is_care}>' == '0') {
                location.href = "<{:U('Pre/code', array('type'=>2))}>";
                return;
            }

            $.get("<{:U('praise')}>", {photos_id : '<{$item.id}>'}, function(res) {
                if (res.status == 0) {
                    praiseTips(res.info);
                } else {
                    $('#numVal').text(parseInt($('#numVal').text()) + 1);
                    $('.popzan').show();
                }
            },'json');
        }

        //提示信息
        function praiseTips(str) {
            $('.smfont').text(str).css("opacity","1");
            setTimeout("$('.smfont').css('opacity',0)", 2000);
        }
    </script>
    <script>
        //验证手机号
        function isMobil(s) {
            var patrn = /^1[0-9]{10}$/;  
            if (!patrn.exec(s)) return false
            return true
        }
    </script>
    <!-- 微信分享开始 -->
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
        wx.config(<{$js_config}>);

        wx.ready(function () {
            // 分享到朋友圈
            wx.onMenuShareTimeline({
                title: '<{$shareTitle}>',
                link: '<{$shareUrl}>',
                imgUrl: '<{$shareImgUrl}>',
                success: function () { 
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () { 
                    // 用户取消分享后执行的回调函数
                }
            });

            // 分享给朋友
            wx.onMenuShareAppMessage({
                title: '小红卡爱旅行|晒出最美旅行照',
                desc: '<{$shareTitle}>',
                link: '<{$shareUrl}>',
                imgUrl: '<{$shareImgUrl}>',
                type: 'link',
                success: function () { 
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () { 
                    // 用户取消分享后执行的回调函数
                }
            });
        })
    </script>
    <!-- 微信分享结束 -->
    </body>
</html>